<?php
include("../../inc/global.inc");
include("../islogin.php");
$url="hr.php";
$thepage=$_GET['page']?$_GET['page']:1;
$maxpage=20;
?>
<?php
if($_GET['del_act']){
mysql_query("delete from job_per where id='".$_GET['del_id']."'");
echo "<script>alert('删除成功');location='$url';</script>";
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="../css/css.css" />
<title>Admin</title>
<script type="text/javascript" src="../js/islogin.js" charset="gb2312"></script>
</head>
<body>
<center>
  <table width="85%" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
    <tr>
      <td height="25" bgcolor="#EEEEF9" style="padding-left:5px;">人才管理(新)&nbsp;&nbsp;<a href="javascript:history.go(-1)">返回</a></td>
    </tr>
  </table>
<table width="85%" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000"> 
	<tr align='center'>
	<td width="3%" height="27" bgcolor="#8DA8CF">编号</td>
	<td width="9%" bgcolor="#8DA8CF">账号</td>
	<td width="6%" bgcolor="#8DA8CF">姓名</td>
	<td width="3%" bgcolor="#8DA8CF">城市</td>
	<td width="10%" bgcolor="#8DA8CF">手机号码</td>
	<td width="15%" bgcolor="#8DA8CF">邮箱</td>
	<td width="7%" bgcolor="#8DA8CF">最新登陆</td>
	<td width="7%" bgcolor="#8DA8CF">管理操作</td>
	</tr>
	</tr>
<?php
$sql="select * from job_per where p_step=0 order by id desc limit ".($thepage-1)*$maxpage.",$maxpage";
$rs=@mysql_query($sql);
$i=1;
while($row=mysql_fetch_array($rs)){
$color=($i%2)?"#FFFFFF":"#eeeeee";
?>
<tr align='center' bgcolor=<?=$color?>>
<td height="25" align="center"><?=$i?></td>
<td align="left" style="padding-left:5px;"><?=$row[p_user]?></td>
<td align="center"><?=$row[p_name]?></td>
<td align="center"><?=$row[p_qw_city]?></td>
<td align="center"><?=$row[p_phone]?></td>
<td align="center"><?=$row[p_email]?></td>
<td align="center"><?php if($row[p_addtime]>=date("Y-m-d")){?>
  <font color="#FF0000">
  <?=date("Y-m-d",strtotime($row[p_logintime]))?>
  </font>
  <?php }else{?>
  <?=date("Y-m-d",strtotime($row[p_logintime]))?>
  <?php }?></td>
<td width="5%" align="center"><a href="hr_modify.php?xg=ok&xg_id=<?=$row['id']?>&xg_page=<?=$thepage?>">编辑</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="<?=$url?>?del_act=ok&del_id=<?=$row['id']?>" onClick="return del()">删除</a></td>
</tr>
<?php
$i++;
}
$totalrecord=@mysql_result(@mysql_query("select count(id) from job_per where p_step=0"),0);
$totalpage=ceil($totalrecord/$maxpage);
?>
  <tr>
     <td height="31" colspan="11" align="center" bgcolor="#FFFFFF"><form method="get" action="<?=$url?>">
<?php if($thepage>1){?>
   <a href="<?=$url?>">第一页</a>&nbsp;<a href="<?=$url?>?page=<?=$thepage-1?>">上一页</a>&nbsp;
<?php }?>  
<?php if($thepage!=$totalpage&&$totalpage>1){?>
   <a href="<?=$url?>?page=<?=$thepage+1?>">下一页</a>&nbsp;<a href="<?=$url?>?page=<?=$totalpage?>">最后一页</a>&nbsp;
<?php }?>   
   【共<font color="red"><?=$totalrecord?></font>条记录】【每页<font color="red"><?=$maxpage?></font>条记录】【共<font color="red"><?=$totalpage?></font>页】<input type="text" name="page" size="3" onKeyUp="IsDigit(this);">&nbsp;<input type="submit" value="GO"></form></td>
  </tr>
</table>
</center>
</BODY>
</HTML>

<script language="javascript">
function IsDigit(obj) 
{ 
if(obj.value.replace(/[\d+]/ig,"").length>0) { 
  alert('请输入数字'); 
  document.getElementById(obj).value =""; 
} 
} 
</script>